Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8s CRD definition for Sentinel rules #182

Closed
wants to merge 3 commits into from

Conversation

louyuting
Copy link
Collaborator

Describe what this PR does / why we need it

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

@louyuting louyuting added area/data-source Issues or PRs related to data-source extension size/XXL Indicate a PR that changes 1000+ lines. labels Jul 6, 2020
@louyuting louyuting added this to the 1.0.0 milestone Jul 6, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jul 7, 2020

Codecov Report

Merging #182 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #182   +/-   ##
=======================================
  Coverage   44.51%   44.51%           
=======================================
  Files          78       78           
  Lines        4315     4315           
=======================================
  Hits         1921     1921           
  Misses       2181     2181           
  Partials      213      213           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3f4832...5b2aec0. Read the comment docs.

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: cbrules.datasource.sentinel.com
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The abbr might not be clear enough. Maybe cbrules -> circuitbreaker.rules or circuitbreakerrules or other better representation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In open-source world we'd like *.sentinel.io (though the domain is not owned by us :(

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer circuitbreaker.rules

minimum: 0
required:
- resource
- limitOrigin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only resource, metricType and count are required. For other attributes, we could provide default values.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense

- controlBehavior
- paramIndex
- threshold
- maxQueueingTimeMs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also simplify the required list here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

@sczyh30 sczyh30 changed the title K8s datasource implementation K8s CRD definition for Sentinel rules Jul 10, 2020
@sczyh30 sczyh30 added area/cloud-native Issues or PRs related to cloud native architecture to-review PRs to review and removed size/XXL Indicate a PR that changes 1000+ lines. labels Jul 10, 2020
@louyuting louyuting modified the milestones: 1.0.0, 0.7.0 Sep 2, 2020
@louyuting
Copy link
Collaborator Author

Duplicated #242

@louyuting louyuting closed this Sep 14, 2020
@sczyh30 sczyh30 removed the to-review PRs to review label Nov 23, 2020
@sczyh30 sczyh30 removed this from the 1.0.0 milestone Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cloud-native Issues or PRs related to cloud native architecture area/data-source Issues or PRs related to data-source extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants